package com.xxwu.springblogsystem.mapper;

import com.xxwu.springblogsystem.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //根据用户名称查询用户信息
    @Select("select * from  user where  user_name = #{userName} and delete_flag = 0")
    User selectUserByUserName(String userName);


    //根据用户id查询用户信息
    @Select("select * from user where id =#{id} and delete_flag = 0")
    User selectUserById(int id);
}
